﻿using System.Windows.Controls;
using System;
using System.Windows.Media.Animation;
using System.Windows.Automation.Peers;
using System.Windows;

namespace GraduApplication.Controls
{

    public partial class SwipeButton : Button
    {
        public SwipeButton()
        {
            InitializeComponent();

            ClickMode = System.Windows.Controls.ClickMode.Press;
        }

        private void DoubleAnimationUsingKeyFrames_Completed(object sender, EventArgs e)
        {
            AnimationClock animation = (AnimationClock)sender;

            if (animation.CurrentState == ClockState.Filling)
            {
                RaiseEvent(new RoutedEventArgs(ClickEvent));
            }
        }
    }
}
